import request from '@/utils/request'

// 查询排班列表
export function listPaibanbiao(query) {
  return request({
    url: '/system/paibanbiao/list',
    method: 'get',
    params: query
  })
}

// 查询当天排班列表
export function listPaibanbiaobyday(query) {
  return request({
    url: '/system/paibanbiao/listbyday',
    method: 'get',
    params: query
  })
}

// 查询排班详细
export function getPaibanbiao(id) {
  return request({
    url: '/system/paibanbiao/' + id,
    method: 'get'
  })
}

// 新增排班
export function addPaibanbiao(data) {
  return request({
    url: '/system/paibanbiao',
    method: 'post',
    data: data
  })
}

// 修改排班
export function updatePaibanbiao(data) {
  return request({
    url: '/system/paibanbiao',
    method: 'put',
    data: data
  })
}

// 删除排班
export function delPaibanbiao(id) {
  return request({
    url: '/system/paibanbiao/' + id,
    method: 'delete'
  })
}

// 删除选择天排班
export function delPaibanbiaobyDay(data) {
  return request({
    url: '/system/paibanbiao/delbyday',
    method: 'delete',
    data:data
  })
}
